// kX Driver / kX Driver Interface / kX Driver Effects Library
// Copyright (c) Eugene Gavrilov, Max Mikhailov, and Hanz, 2002-2004.
// All rights reserved

/*
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

// 10kX microcode
// Patch name: 'Stereo Flanger'

char *flanger_copyright="Copyright 1997 E-mu Systems/Creative Technology, Ltd.";
char *flanger_engine="EMU10K1_A0";
char *flanger_comment="APS Stereo Flanger, DLLed by Hanz, Apr 5 2002";
char *flanger_created="Fri Jul 13 12:59:04 2001 ";
char *flanger_guid="99651dbe-9d73-45f1-97e4-07c1a9459839";

char *flanger_name="APS Flanger";
int flanger_itramsize=780,flanger_xtramsize=0;

dsp_register_info flanger_info[]={
	{ "in0",0x4000,0x7,0xffff,0x0 },
	{ "in1",0x4001,0x7,0xffff,0x0 },
	{ "out0",0x8000,0x8,0xffff,0x0 },
	{ "out1",0x8001,0x8,0xffff,0x0 },
	{ "wet8002",0x8002,0x4,0xffff,0x3ffff79c },
	{ "sti8003",0x8003,0x1,0xffff,0x800 },
	{ "dyn8004",0x8004,0x1,0xffff,0xc0000000 },
	{ "dyn8005",0x8005,0x1,0xffff,0x303c0 },
	{ "dyn8006",0x8006,0x1,0xffff,0x0 },
	{ "dyn8007",0x8007,0x1,0xffff,0x0 },
	{ "dyn8008",0x8008,0x1,0xffff,0x114d2 },
	{ "dyn8009",0x8009,0x1,0xffff,0x0 },
	{ "dyn800a",0x800a,0x1,0xffff,0x0 },
	{ "sti800b",0x800b,0x1,0xffff,0x0 },
	{ "sti800c",0x800c,0x1,0xffff,0x7fffffff },
	{ "tmp8025",0x800d,0x1,0xffff,0x0 },
	{ "itr800d",0x800e,0x49,0xffff,0x0 },
	{ "&itr800d",0x800f,0xb,0xffff,0x0 },
	{ "itr8011",0x8010,0x29,0xffff,0x62 },
	{ "&itr8011",0x8011,0xb,0xffff,0x62 },
	{ "itr8015",0x8012,0x29,0xffff,0xc1 },
	{ "&itr8015",0x8013,0xb,0xffff,0xc1 },
	{ "itr8017",0x8014,0x29,0xffff,0xc2 },
	{ "&itr8017",0x8015,0xb,0xffff,0xc2 },
	{ "itr800f",0x8016,0x49,0xffff,0x183 },
	{ "&itr800f",0x8017,0xb,0xffff,0x183 },
	{ "itr8013",0x8018,0x29,0xffff,0x1e5 },
	{ "&itr8013",0x8019,0xb,0xffff,0x1e5 },
	{ "itr8019",0x801a,0x29,0xffff,0x244 },
	{ "&itr8019",0x801b,0xb,0xffff,0x244 },
	{ "itr801b",0x801c,0x29,0xffff,0x245 },
	{ "&itr801b",0x801d,0xb,0xffff,0x245 },
	{ "itr801d",0x801e,0x49,0xffff,0x306 },
	{ "&itr801d",0x801f,0xb,0xffff,0x306 },
	{ "itr8021",0x8020,0x29,0xffff,0x308 },
	{ "&itr8021",0x8021,0xb,0xffff,0x308 },
	{ "itr801f",0x8022,0x49,0xffff,0x309 },
	{ "&itr801f",0x8023,0xb,0xffff,0x309 },
	{ "itr8023",0x8024,0x29,0xffff,0x30b },
	{ "&itr8023",0x8025,0xb,0xffff,0x30b },
};

dsp_code flanger_code[]={
	{ 0x0,0x801e,0x4000,0x2040,0x2040 },
	{ 0x0,0x800e,0x2056,0x8010,0x8004 },
	{ 0x0,0x8022,0x4001,0x2040,0x2040 },
	{ 0x0,0x8016,0x2056,0x8018,0x8004 },
	{ 0x0,0x800b,0x800b,0x8008,0x800c },
	{ 0x1,0x800c,0x800c,0x8008,0x800b },
	{ 0x0,0x8009,0x800b,0x2040,0x2040 },
	{ 0x0,0x800a,0x800c,0x2040,0x2040 },
	{ 0x0,0x2040,0x2040,0x2040,0x2040 },
	{ 0x0,0x2040,0x2040,0x2040,0x2040 },
	{ 0x5,0x800d,0x2040,0x8006,0x2055 },
	{ 0xe,0x800d,0x8012,0x800d,0x8014 },
	{ 0xe,0x8000,0x8020,0x8002,0x800d },
	{ 0x5,0x800d,0x2040,0x8007,0x2055 },
	{ 0xe,0x800d,0x801a,0x800d,0x801c },
	{ 0xe,0x8001,0x8024,0x8002,0x800d },
	{ 0x0,0x8006,0x8011,0x8009,0x8005 },
	{ 0x0,0x8013,0x8006,0x2040,0x2040 },
	{ 0x1,0x8015,0x8006,0x8003,0x204e },
	{ 0x0,0x8007,0x8019,0x800a,0x8005 },
	{ 0x0,0x801b,0x8007,0x2040,0x2040 },
	{ 0x1,0x801d,0x8007,0x8003,0x204e },
};

#define _WET_LEVEL		0x8002
#define _FEEDBACK		0x8004
#define _LFO_DEPTH		0x8005
#define _LFO_FREQ		0x8008
